# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=rofi-file-browser-extended
pkgver=1.3.1
pkgrel=1
pkgdesc="Use rofi to quickly open files"
url="https://github.com/marvinkreis/rofi-file-browser-extended"
arch="all"
license="MIT"
depends="cmd:rofi"
makedepends="cmake rofi-dev"
subpackages="$pkgname-doc"
source="https://github.com/marvinkreis/rofi-file-browser-extended/archive/$pkgver/rofi-file-browser-extended-$pkgver.tar.gz
	gcc14.patch
	gcc14-32-bit.patch"
options="!check"  # no tests provided

build() {
	local crossopts=
	if [ "$CBUILD" != "$CHOST" ]; then
		crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_VERBOSE_MAKEFILE=ON \
		$crossopts .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
269e33d62e5fdf7f6c48763ae4309fac53873d53af4ebf78f731b709ac6ff41d8f8cf21de917866fe5a80f4949d70d3be6e516c3825a8768106c706438a5b3d1  rofi-file-browser-extended-1.3.1.tar.gz
6a68e6fb1b11af206c711fe1f9d63306c39f8adf695130ce177c212565820d7cb2af532186f3e4d10dc4a2e763901151793912bf01d2eadc149887601567544b  gcc14.patch
822512ef5d063d5f084451ecbd4b6c1453479bf79c9b04a54cf950e189e672665595098833a169bbeaf60c51c472e87b389c5f4c0f2ed0a5cc789a7cc44106aa  gcc14-32-bit.patch
"
